/**
  ******************************************************************************
  * @file           : bsp_control.h
  * @author         : Ylint
  * @brief          : None
  * @attention      : None
  * @date           : 2024/4/9
  ******************************************************************************
  */

#ifndef RCT6_BALANCE_CAR_BSP_CONTROL_H
#define RCT6_BALANCE_CAR_BSP_CONTROL_H

#include "main.h"

#define _PWM_OUT_MAX        7200
#define _PWM_OUT_MIN        -7200


extern int MOTO1, MOTO2;
extern int Encoder_Left, Encoder_Right;




int GET_Encoder(TIM_HandleTypeDef *htim);
void Motor_Control(void);
void Motor_PWM_Out(int motoA, int motoB);
uint8_t CAR_AnomalyDetection(int out);
void CAR_LandingDetection(void);

#endif //RCT6_BALANCE_CAR_BSP_CONTROL_H
